<html>
{loadres="./res/html/common/head.html"}

<body class="skin-default page-login page-status-200">
    <div class="container" id="content">
        <div class="login">
            <form class="form-horizontal" method="post" action="./login?do=submit" id="login-form">
                <div class="login-block">
                    
                    <div class="alert alert-danger" id="login-error-notify" style="display: none;">
                        <button type="button" class="close" data-dismiss="alert">×</button>
                        登录失败
                        <p></p>
                    </div>
                    
                    <div class="input-group">
                        <span class="input-group-addon"><i class="fa fa-fw fa-user" style="line-height: 40px;"></i></span>
                        <div class="fg-line">
                            <input class="form-control" type="text" name="user" id="user" placeholder="用户名"
                                autocorrect="off" autocapitalize="off" value="">
                        </div>
                    </div>

                    <div class="input-group">
                        <span class="input-group-addon"><i class="fa fa-fw fa-lock" style="line-height: 40px;"></i></span>
                        <div class="fg-line">
                            <input class="form-control" type="password" name="pass" id="pass" placeholder="密码">
                        </div>
                    </div>

                    <div class="checkbox">
                        <label style="color:black;">
                            <input type="checkbox" name="remember" id="remember" checked="">
                            <i class="input-helper"></i>
                            记住我？
                        </label>
                    </div>

                    <button class="btn btn-primary btn-lg btn-block waves-effect" id="login" onclick="Login()" type="button">登录</button>
                    <div class="login-options">

                        &nbsp; <a id="reset-link" href="/com/reg">注册账号</a>
                    </div>

                    <div class="login-options">

                        &nbsp; <a id="reset-link" href="/com/passfd">(忘记密码?)</a>
                    </div>

                </div>
            </form>

        </div>
    </div>
    <script>
    function Login(){
        Ajax("{$WEBPATH}/api/user/login",{"user":$("#user").val(),"pass":$("#pass").val()},function(res){
            if(res.code==200){
                setTimeout(function(){window.location.href="{$WEBPATH}/";},1500);
            }
            layer.msg(res.msg);
        });
    }
    </script>

    {loadres="./res/html/common/foot.html"}
</body>

</html>